package com.xl.sst.biz.impl;


import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.xl.sst.biz.IndexBiz;
import com.xl.sst.dao.BigClassDao;
import com.xl.sst.dao.EightclassDao;
import com.xl.sst.dao.ImageDao;
import com.xl.sst.dao.TouziDao;
import com.xl.sst.vo.BigClass;
import com.xl.sst.vo.Eightclass;
import com.xl.sst.vo.Image;
import com.xl.sst.vo.SmallClass;
import com.xl.sst.vo.Touzi;

@Service
public class IndexBizImpl implements IndexBiz{
	@Resource
	private BigClassDao bigClassDao;
	@Resource
	private TouziDao touziDao;
	@Resource
	private ImageDao imageDao;
	@Resource
	private EightclassDao eightclassDao;

	public List<Touzi> selectTouziAll() {
		return touziDao.selectAll();
	}
	public List<BigClass> selectXuQiuAll() {
		List<BigClass> s = bigClassDao.selectAllBigAndSmall();
		for(BigClass b:s) {
			List<SmallClass> s1 = b.getCase1();
			for(SmallClass s2:s1) {
				List<String> s3 = bigClassDao.selectBysmallClassId(s2.getId());
				s2.setCaselis(s3);
			}
		}
		return s;	
	}

	public List<Image> selectAllImageByStatus(Integer status){
		
		return imageDao.selectAllImageByStatus(status);
	}
	
	public List<Eightclass> selectAllEightclass() {
		
		return eightclassDao.selectAllEightclass();
	}

}

